package com.yxq.springboot.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.yxq.springboot.bean.SpringBootUser;
import com.yxq.springboot.mapper.SpringBootUserMapper;


@RestController
@RequestMapping("/api")
public class ApiController {

	@Autowired
	private SpringBootUserMapper springbootUserMappper;

	@RequestMapping(value = "/select", method = RequestMethod.GET)
	public SpringBootUser get(@RequestParam(defaultValue = "1") Integer id) {
		return springbootUserMappper.selectByPrimaryKey(id);
	}
}
